package com.matt.sooncleaner.menu

import android.os.Bundle
import com.matt.sooncleaner.BuildConfig
import com.matt.sooncleaner.R
import com.matt.sooncleaner.arch.ArchActivity
import com.matt.sooncleaner.databinding.ActivityMenuBinding
import com.matt.sooncleaner.web.WebViewActivity

class MenuActivity: ArchActivity<ActivityMenuBinding>() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding.contactUs.setOnClickListener {
            EmailUtils.startEmailApp(this)
        }

        binding.rateUs.setOnClickListener {
            if (!RateUtils.isClickRate()) {
                RateDialog(this).show()
            }
        }

        binding.privacyPolicy.setOnClickListener {
            WebViewActivity.startWebViewActivity(this,
                BuildConfig.PRIVACY_POLICY_URL, getString(R.string.privacy_policy))
        }
    }
}